import fs from 'fs';
import { join } from 'path';

export default () => {
  const cachePath = process.cwd() + `/src/.qps/plugin-models`;
  if (!fs.existsSync(cachePath)) {
    fs.mkdirSync(cachePath);
  }

  fs.copyFileSync(
    join(__dirname, './use-model.ts'),
    join(cachePath, './use-model.ts'),
  );
  fs.copyFileSync(
    join(__dirname, './provider.tsx'),
    join(cachePath, './provider.tsx'),
  );
};
